package demo;

import java.util.ArrayList;

public class W6_ArrayListDeweight {
	public static void main(String[] args) {
		int[] arr1 = {1,2,3};
		int[] arr2 = {3,4,5,2};
		ArrayList<Integer> list = new ArrayList();
		
		for(int arr:arr1){
			list.add(arr);
		}
		for(int arr:arr2){
			if(!list.contains(arr)){
				list.add(arr);
			}else{
				list.remove(list.indexOf(arr));
			}
		}
		System.out.println(list);
	}
}
